﻿using nsadv.Statistic.Domain;
using System.Linq;

namespace nsadv.Statistic.Web.Security
{
	public static class UserHelper
	{
		public static bool Is(this User user, UserRole[] roles)
		{
			return roles.Contains(user.Role);
		}

		public static bool Is(this User user, UserRole role)
		{
			return user.Role == role;
		}
	}
}